package com.crm.controller;

import com.crm.entity.UserChecks;
import com.crm.service.UserChecksService;
import com.crm.util.FenyeUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author
 * @date 2020/5/11 16:56
 */
@RestController
@RequestMapping("/userchecks")
public class UserChecksController {
    @Autowired
    private UserChecksService userChecksService;

    @GetMapping
    public FenyeUtil<UserChecks> findByUserCherksByPage(UserChecks userChecks,Integer page){

        return  userChecksService.findAllByPage(userChecks,page);
    }
    @PostMapping
    public  String addUserChekck(UserChecks userChecks){
        return  userChecksService.addUserChecks(userChecks);
    }

}
